import { createRouter, createWebHistory } from 'vue-router';


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      redirect:'/login'
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    {
    path: '/register',
    name: 'register',
    component: () => import('../views/RegisterView.vue'),
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../views/MainView.vue'),
    },
    {
      path: '/md',
      component: () => import('@/views/HealthRecord/md.vue'),
    },
    {
      path:'/user-manage',
      name: 'user-manage',
      component: () => import('../views/UserManageView/UserManage.vue'),
    },
    {
      path: '/doctor',
      name: 'doctor',
      component: () => import('../views/DoctorView.vue'),
    },
    {
      path: '/user-profile',
      name: 'user-profile',
      component: () => import('../views/Profile/UserProfile.vue'),
    },
    {
      path: '/user-edit',
      name: 'user-edit',
      component: () => import('../views/Profile/UserEdit.vue'),
    },
    {
      path: '/user-profile/authorization',
      name: 'authorization-management',
      component: () => import('../views/Profile/AuthorizationManagement.vue')
    },
    {
      path: '/user-profile/authorization/:id',
      name: 'authorization-detail',
      component: () => import('../views/Profile/AuthorizationDetail.vue')
    },
    {
      path: '/navbar',
      name: 'navbar',
      component: () => import('@/components/NavBar.vue'),
    },

    {
      path: '/basic',
      component: () => import('@/views/HealthRecord/BasicInfo.vue') },
    {
      path: '/medical-history',
      component: () => import('@/views/HealthRecord/MedicalHistory.vue') },
    {
      path: '/family-history',
      component: () => import('@/views/HealthRecord/FamilyHistory.vue') },
    {
      path: '/allergy-history',
      component: () => import('@/views/HealthRecord/AllergyHistory.vue') },
    {
      path: '/medication',
      component: () => import('@/views/HealthRecord/Medication.vue') },
    {
      path: '/check-up',
      component: () => import('@/views/HealthRecord/Checkup.vue') },

    { 
      path: '/analysis',
      component: () => import('@/views/Analysis/Analysis.vue')
    },
    { 
      path: '/consult',
      component: () => import('@/views/Consultation.vue')
    },
    { 
      path: '/report',
      component: () => import('@/views/RiskReport.vue')
    },
    {
      path:'/nb',
      component: () => import('@/views/Play/nb.vue')
    },
    {
      path: '/block',
      component: () => import('@/views/UserManageView/Block.vue')
    },
    {
      path: '/log',
      component: () => import('@/views/UserManageView/Log.vue')
    },
    {
      path:'/bot',
      component: () => import('@/views/Play/bot.vue')
    },
    {
      path:'/fish',
      component:()=>import('@/views/Play/woodenFish.vue')
    },
    {
      path:'/analysis',
      component:()=>import('@/views/Analysis/Analysis.vue')
    }
  ],
})

export default router
